using INTEX.DataBase;
using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Data;
using System.Collections.Generic;
namespace WPFExcelReport
{
    public partial class VBSSATZ : ViewModelBase
    {
        public DataSet LOADBYART(Dictionary<string, object> pm)
        {
            
            dwData = TBMain.NewRow();
            dwData["BSMANDANT"] = app.Mandant;
            dwData["BSKART"] = pm["ART"].ToString(); 
            SResult = QBS01(dwData);
            return SResult;
        }
        public void CREATEBYART(Dictionary<string, object> pm)
        {
            dwData = TBMain.NewRow();
            SetUpNewRow(ref dwData);
            dwData["BSMANDANT"] = app.Mandant;
            dwData["BSKART"] = pm["ART"].ToString(); 
            TBMain.Rows.InsertAt(dwData, 0);
            InsertBSSATZ(dwData); 
        }
        public virtual void Copy(Dictionary<string, object> pm)
        {
            string tart = (string)pm["TART"];
            string sart = (string)pm["SART"];
            dwData = TBMain.NewRow();
            dwData["BSMANDANT"] = app.Mandant;
            dwData["BSKART"] = sart.PadRight(20); 
            SResult = QBS01(dwData);
            foreach (DataRow dwSrc in SResult.Tables[0].Rows)
            {
                dwData = TBMain.NewRow();
                dwData.ItemArray = dwSrc.ItemArray;
                dwData["BSKART"] = tart.PadRight(20);
                TBMain.Rows.InsertAt(dwData, 0);
                DBSSATZ01(dwData);
                InsertBSSATZ(dwData);
            }
        }
    }
    public partial class VBSSATZ
    {
        public string BSKART { get { if (dwMaster == null) return ""; return dwMaster["BSKART"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSKART"] = value; OnPropertyChanged("BSKART", value); } } //lENGth 20
        public double BSFDZ { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["BSFDZ"].ToString()); } set { if (dwMaster == null) return; dwMaster["BSFDZ"] = value; OnPropertyChanged("BSFDZ", value); } } //lENGth 0
        public string BSBEZ { get { if (dwMaster == null) return ""; return dwMaster["BSBEZ"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSBEZ"] = value; OnPropertyChanged("BSBEZ", value); } } //lENGth 40
        public string BSSRFNR { get { if (dwMaster == null) return ""; return dwMaster["BSSRFNR"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSSRFNR"] = value; OnPropertyChanged("BSSRFNR", value); } } //lENGth 15
        public double BSFAKTOR { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["BSFAKTOR"].ToString()); } set { if (dwMaster == null) return; dwMaster["BSFAKTOR"] = value; OnPropertyChanged("BSFAKTOR", value); } } //lENGth 0

        #region======ColumnSchema==========
        /*
                 public string BSMANDANT { get { if (dwMaster == null) return ""; return dwMaster["BSMANDANT"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSMANDANT"] = value; OnPropertyChanged("BSMANDANT", value); } } //lENGth 2
                 public string BSKART { get { if (dwMaster == null) return ""; return dwMaster["BSKART"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSKART"] = value; OnPropertyChanged("BSKART", value); } } //lENGth 20
                 public double BSAENDZL { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["BSAENDZL"].ToString()); } set { if (dwMaster == null) return; dwMaster["BSAENDZL"] = value; OnPropertyChanged("BSAENDZL", value); } } //lENGth 0
                 public string BSAENDBEN { get { if (dwMaster == null) return ""; return dwMaster["BSAENDBEN"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSAENDBEN"] = value; OnPropertyChanged("BSAENDBEN", value); } } //lENGth 8
                 public double BSAENDDAT { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["BSAENDDAT"].ToString()); } set { if (dwMaster == null) return; dwMaster["BSAENDDAT"] = value; OnPropertyChanged("BSAENDDAT", value); } } //lENGth 0
                 public string BSNEUBEN { get { if (dwMaster == null) return ""; return dwMaster["BSNEUBEN"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSNEUBEN"] = value; OnPropertyChanged("BSNEUBEN", value); } } //lENGth 8
                 public double BSNEUDAT { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["BSNEUDAT"].ToString()); } set { if (dwMaster == null) return; dwMaster["BSNEUDAT"] = value; OnPropertyChanged("BSNEUDAT", value); } } //lENGth 0
                 public string BSMTART { get { if (dwMaster == null) return ""; return dwMaster["BSMTART"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSMTART"] = value; OnPropertyChanged("BSMTART", value); } } //lENGth 4
                 public string BSSTDKVAR { get { if (dwMaster == null) return ""; return dwMaster["BSSTDKVAR"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSSTDKVAR"] = value; OnPropertyChanged("BSSTDKVAR", value); } } //lENGth 2
                 public string BSSTAKZ { get { if (dwMaster == null) return ""; return dwMaster["BSSTAKZ"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSSTAKZ"] = value; OnPropertyChanged("BSSTAKZ", value); } } //lENGth 1
                 public string BSMUSTER { get { if (dwMaster == null) return ""; return dwMaster["BSMUSTER"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSMUSTER"] = value; OnPropertyChanged("BSMUSTER", value); } } //lENGth 1
                 public string BSFARBVW { get { if (dwMaster == null) return ""; return dwMaster["BSFARBVW"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSFARBVW"] = value; OnPropertyChanged("BSFARBVW", value); } } //lENGth 1
                 public string BSFARBSTUE { get { if (dwMaster == null) return ""; return dwMaster["BSFARBSTUE"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSFARBSTUE"] = value; OnPropertyChanged("BSFARBSTUE", value); } } //lENGth 1
                 public string BSPFVARN { get { if (dwMaster == null) return ""; return dwMaster["BSPFVARN"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSPFVARN"] = value; OnPropertyChanged("BSPFVARN", value); } } //lENGth 1
                 public string BSPROGRP { get { if (dwMaster == null) return ""; return dwMaster["BSPROGRP"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSPROGRP"] = value; OnPropertyChanged("BSPROGRP", value); } } //lENGth 3
                 public string BSARTGRP { get { if (dwMaster == null) return ""; return dwMaster["BSARTGRP"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSARTGRP"] = value; OnPropertyChanged("BSARTGRP", value); } } //lENGth 3
                 public string BSPMGRP { get { if (dwMaster == null) return ""; return dwMaster["BSPMGRP"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSPMGRP"] = value; OnPropertyChanged("BSPMGRP", value); } } //lENGth 4
                 public string BSBAUMKZ { get { if (dwMaster == null) return ""; return dwMaster["BSBAUMKZ"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSBAUMKZ"] = value; OnPropertyChanged("BSBAUMKZ", value); } } //lENGth 1
                 public string BSVERWEN { get { if (dwMaster == null) return ""; return dwMaster["BSVERWEN"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSVERWEN"] = value; OnPropertyChanged("BSVERWEN", value); } } //lENGth 1
                 public double BSFDZLEIST { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["BSFDZLEIST"].ToString()); } set { if (dwMaster == null) return; dwMaster["BSFDZLEIST"] = value; OnPropertyChanged("BSFDZLEIST", value); } } //lENGth 0
                 public string BSKNOTEN { get { if (dwMaster == null) return ""; return dwMaster["BSKNOTEN"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSKNOTEN"] = value; OnPropertyChanged("BSKNOTEN", value); } } //lENGth 1
                 public string BSCADKEY { get { if (dwMaster == null) return ""; return dwMaster["BSCADKEY"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSCADKEY"] = value; OnPropertyChanged("BSCADKEY", value); } } //lENGth 30
                 public string BSANZTB { get { if (dwMaster == null) return ""; return dwMaster["BSANZTB"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSANZTB"] = value; OnPropertyChanged("BSANZTB", value); } } //lENGth 2
                 public string BSKRANF { get { if (dwMaster == null) return ""; return dwMaster["BSKRANF"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSKRANF"] = value; OnPropertyChanged("BSKRANF", value); } } //lENGth 10
                 public string BSKRENDE { get { if (dwMaster == null) return ""; return dwMaster["BSKRENDE"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSKRENDE"] = value; OnPropertyChanged("BSKRENDE", value); } } //lENGth 10
                 public string BSKRMITTE { get { if (dwMaster == null) return ""; return dwMaster["BSKRMITTE"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSKRMITTE"] = value; OnPropertyChanged("BSKRMITTE", value); } } //lENGth 1
                 public string BSFDFLGKR { get { if (dwMaster == null) return ""; return dwMaster["BSFDFLGKR"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSFDFLGKR"] = value; OnPropertyChanged("BSFDFLGKR", value); } } //lENGth 11
                 public string BSKRART { get { if (dwMaster == null) return ""; return dwMaster["BSKRART"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSKRART"] = value; OnPropertyChanged("BSKRART", value); } } //lENGth 10
                 public double BSSCHAERBR { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["BSSCHAERBR"].ToString()); } set { if (dwMaster == null) return; dwMaster["BSSCHAERBR"] = value; OnPropertyChanged("BSSCHAERBR", value); } } //lENGth 0
                 public double BSRIETF { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["BSRIETF"].ToString()); } set { if (dwMaster == null) return; dwMaster["BSRIETF"] = value; OnPropertyChanged("BSRIETF", value); } } //lENGth 0
                 public string BSFDFLGRI { get { if (dwMaster == null) return ""; return dwMaster["BSFDFLGRI"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSFDFLGRI"] = value; OnPropertyChanged("BSFDFLGRI", value); } } //lENGth 11
                 public string BSBEM { get { if (dwMaster == null) return ""; return dwMaster["BSBEM"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSBEM"] = value; OnPropertyChanged("BSBEM", value); } } //lENGth 40
                 public string BSZOLLTNR { get { if (dwMaster == null) return ""; return dwMaster["BSZOLLTNR"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSZOLLTNR"] = value; OnPropertyChanged("BSZOLLTNR", value); } } //lENGth 20
                 public string BSSUBSTGR { get { if (dwMaster == null) return ""; return dwMaster["BSSUBSTGR"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSSUBSTGR"] = value; OnPropertyChanged("BSSUBSTGR", value); } } //lENGth 3
                 public string BSHANDICAP { get { if (dwMaster == null) return ""; return dwMaster["BSHANDICAP"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSHANDICAP"] = value; OnPropertyChanged("BSHANDICAP", value); } } //lENGth 3
                 public string BSAFFINITY { get { if (dwMaster == null) return ""; return dwMaster["BSAFFINITY"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSAFFINITY"] = value; OnPropertyChanged("BSAFFINITY", value); } } //lENGth 15
                 public string BSSUBST1 { get { if (dwMaster == null) return ""; return dwMaster["BSSUBST1"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSSUBST1"] = value; OnPropertyChanged("BSSUBST1", value); } } //lENGth 2
                 public string BSSUBST2 { get { if (dwMaster == null) return ""; return dwMaster["BSSUBST2"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSSUBST2"] = value; OnPropertyChanged("BSSUBST2", value); } } //lENGth 2
                 public string BSBLEACHED { get { if (dwMaster == null) return ""; return dwMaster["BSBLEACHED"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSBLEACHED"] = value; OnPropertyChanged("BSBLEACHED", value); } } //lENGth 1
                 public string BSCLORINEST { get { if (dwMaster == null) return ""; return dwMaster["BSCLORINEST"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSCLORINEST"] = value; OnPropertyChanged("BSCLORINEST", value); } } //lENGth 1
                 public double BSFIXTEMP { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["BSFIXTEMP"].ToString()); } set { if (dwMaster == null) return; dwMaster["BSFIXTEMP"] = value; OnPropertyChanged("BSFIXTEMP", value); } } //lENGth 0
                 public string BSPRODH { get { if (dwMaster == null) return ""; return dwMaster["BSPRODH"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSPRODH"] = value; OnPropertyChanged("BSPRODH", value); } } //lENGth 18
                 public string BSMATKL { get { if (dwMaster == null) return ""; return dwMaster["BSMATKL"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSMATKL"] = value; OnPropertyChanged("BSMATKL", value); } } //lENGth 9
                 public string BSPLGRP { get { if (dwMaster == null) return ""; return dwMaster["BSPLGRP"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSPLGRP"] = value; OnPropertyChanged("BSPLGRP", value); } } //lENGth 2
                 public string BSPLANART { get { if (dwMaster == null) return ""; return dwMaster["BSPLANART"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSPLANART"] = value; OnPropertyChanged("BSPLANART", value); } } //lENGth 20
                 public string BSEKGRP { get { if (dwMaster == null) return ""; return dwMaster["BSEKGRP"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSEKGRP"] = value; OnPropertyChanged("BSEKGRP", value); } } //lENGth 3
                 public string BSBSTME { get { if (dwMaster == null) return ""; return dwMaster["BSBSTME"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSBSTME"] = value; OnPropertyChanged("BSBSTME", value); } } //lENGth 3
                 public string BSVABME { get { if (dwMaster == null) return ""; return dwMaster["BSVABME"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSVABME"] = value; OnPropertyChanged("BSVABME", value); } } //lENGth 1
                 public string BSEKWSL { get { if (dwMaster == null) return ""; return dwMaster["BSEKWSL"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSEKWSL"] = value; OnPropertyChanged("BSEKWSL", value); } } //lENGth 4
                 public string BSINKZ { get { if (dwMaster == null) return ""; return dwMaster["BSINKZ"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSINKZ"] = value; OnPropertyChanged("BSINKZ", value); } } //lENGth 1
                 public double BSINPR { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["BSINPR"].ToString()); } set { if (dwMaster == null) return; dwMaster["BSINPR"] = value; OnPropertyChanged("BSINPR", value); } } //lENGth 0
                 public double BSBEWAB { get { if (dwMaster == null) return 0.0; return  Convert.ToDouble(dwMaster["BSBEWAB"].ToString()); } set { if (dwMaster == null) return; dwMaster["BSBEWAB"] = value; OnPropertyChanged("BSBEWAB", value); } } //lENGth 0
                 public string BSFILLER { get { if (dwMaster == null) return ""; return dwMaster["BSFILLER"].ToString(); } set { if (dwMaster == null) return; dwMaster["BSFILLER"] = value; OnPropertyChanged("BSFILLER", value); } } //lENGth 64
        */
        #endregion
    }
}
